#ifndef ARGS_H
#define	ARGS_H

#include <string>
#include <getopt.h>

#include <opencv2/opencv.hpp>

#include "effects/Effects.h"

using namespace std;

class Args {
public:
    static string usage();

    Args(const int argc, char** argv);
    virtual ~Args();

    void parse();

private:
    void parseLongOptions();
    void parseMorphologyExOption(string option, int operation);
    vector<int> parseIntegersArgument(string option, const vector<int>& count) const;
    
public:
    bool help, noOriginal;
    string output;

    IplImage *image;
    CvCapture *video;
    
    Effects *effects;

private:
    static const char* optstring;
    static const option options[];
    enum LongOption {PYRDOWN, PYRUP, SOBEL, LAPLASE, CANNY, ERODE, DILATE, OPEN,
                CLOSE, GRADIENT, TOPHAT, BLACKHAT, CONTOURS, HOUGHLINES, BACKPROJECTION,
                CONNECTEDCOMPONENTS, GOODFEATURES, SAVEIMAGE};
    static int longOption;

    const int argc;
    char** argv;
};

#endif	/* ARGS_H */

